package de.fuberlin.inf.alp2.ue10.a4;

import de.fuberlin.inf.alp2.utils.ConsoleInput;

public class TrafficCounter extends SequentialInc {
	String location;
	public TrafficCounter(String location){
		this.location = location;
	}
	public boolean trafficEvent(){
		int userInput = -1;
		while(userInput < 0)
			userInput = ConsoleInput.readInt("Enter an integer greater than 0" +
				" to simulate a trafficevent\n(the input 0 will terminate " +
				"count.", "The entered string could not be converted to int.");
		if (userInput != 0)
			this.increment();
		return (userInput != 0);
	}
}
